package com.cc.controller;

import com.cc.comm.R;
import com.cc.dto.UserLoginDTO;
import com.cc.service.EmployeesService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: UserController
 * @Description:
 * @Author: 晓东√
 * @Date: 2024-12-16 11:35
 * @Version: 1.0
 **/
@RestController
@RequestMapping("user")
@Tag(name = "UserController",description = "用户接口")
public class UserController {

    @Autowired
    EmployeesService employeesService;
    //登录接口
    @PostMapping("/login")
    @Operation(summary = "登录接口")
    public R login(@RequestBody UserLoginDTO userLogin){
        //调用服务
        //返回结果集
        return R.success(employeesService.login(userLogin));
    }
}
